package top.zhangjianyong.blog.exception;

import lombok.Getter;
import lombok.Setter;
import top.zhangjianyong.blog.enums.RespCode;

/**
 * 接口响应异常
 *
 * @author zhangjianyong
 * @since 2024/8/1 上午9:27
 */
@Getter
@Setter
public class ApiException extends RuntimeException {
  private RespCode respCode;

  public ApiException(RespCode respCode) {
    super();
    this.respCode = respCode;
  }

  public ApiException(RespCode respCode, Throwable cause) {
    super(cause);
    this.respCode = respCode;
  }
}
